<template>
	<view class="container">
		<view class="tui-addr-box">
			<form :report-submit="true">
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">超级管理员类型</view>
						<input placeholder-class="tui-phcolor" class="tui-input" value="经营者/法人" disabled maxlength="50" type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">超级管理员姓名</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_name" placeholder="请输入商家商家名称" maxlength="50" type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">联系手机</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_name" placeholder="请输入商家商家名称" maxlength="50" type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">联系邮箱</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_name" placeholder="请输入商家商家名称" maxlength="50" type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">超级管理员身份证件号码</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_name" placeholder="请输入商家商家名称" maxlength="50" type="text" />
					</view>
				</tui-list-cell>
				

				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell fin-list">
						<view class="tui-title">超级管理员证件反面照片</view>
						<view class="fin_img" @tap="chooseImageIdcard" v-if="front_id_card==''">
							<view class="icon_cam">
								<tui-icon name="camera-add" :size="28" color="#ababab"></tui-icon>
							</view>
						    <view class="fin_txt">上传照片</view>
						</view>
						<view class="fin_img" v-else>
							<image class="uni-uploader__img" :src="front_id_card" :data-src="front_id_card" @tap="chooseImageIdcard"></image>
						</view>
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell fin-list">
						<view class="tui-title">超级管理员证件有效期开始时间</view>
						<view class="fin_img" @tap="chooseImageBackCard" v-if="back_id_card==''">
							<view class="icon_cam">
								<tui-icon name="camera-add" :size="28" color="#ababab"></tui-icon>
							</view>
						    <view class="fin_txt">上传照片</view>
						</view>
						<view class="fin_img" v-else>
							<image class="uni-uploader__img" :src="back_id_card" :data-src="back_id_card" @tap="chooseImageBackCard"></image>
						</view>
					</view>
				</tui-list-cell>
				
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">超级管理员证件有效期开始时间</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_name" placeholder="请输入商家商家名称" maxlength="50" type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">超级管理员证件有效期结束时间</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="credit_code" placeholder="请输入统一信用代码" maxlength="18" type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">主体类型</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell fin-list">
						<view class="tui-title">营业执照图片</view>
						<view class="fin_img" @tap="chooseImageBusiness" v-if="business_license==''">
							<view class="icon_cam">
								<tui-icon name="camera-add" :size="28" color="#ababab"></tui-icon>
							</view>
						    
						    <view class="fin_txt">上传照片</view>
						</view>
						<view class="fin_img" v-else>
							<image class="uni-uploader__img" :src="business_license" :data-src="business_license" @tap="chooseImageBusiness"></image>
						</view>
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">注册号/统一社会信用代码</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">商户名称</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">个体户经营者/法人姓名</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">注册地址</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">营业执照有效期限开始日期</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">营业执照有有效期限结束日期</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">证件持有人类型</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">身份证人像面照片</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">身份证国徽面照片</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">身份证姓名</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">身份证号码</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">身份证居住地址</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">身份证有效期开始时间</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">身份证有效期结束时间</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">经营者/法人是否为受益人</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">商户简称</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">客服电话</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">经营场景类型</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">线下场所名称</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">线下场所省市编码</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">线下场所地址</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell fin-list">
						<view class="tui-title">线下场所门头照片</view>
						<view class="fin_img" @tap="chooseImageShopPhoto" v-if="shop_photos==''">
							<view class="icon_cam">
								<tui-icon name="camera-add" :size="28" color="#ababab"></tui-icon>
							</view>
						    
						    <view class="fin_txt">上传照片</view>
						</view>
						<view class="fin_img" v-else>
							<image class="uni-uploader__img" :src="shop_photos" :data-src="shop_photos" @tap="chooseImageShopPhoto"></image>
						</view>
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell fin-list">
						<view class="tui-title">线下场所内部照片</view>
						<view class="fin_img" @tap="chooseImageShopPhoto" v-if="shop_photos==''">
							<view class="icon_cam">
								<tui-icon name="camera-add" :size="28" color="#ababab"></tui-icon>
							</view>
						    
						    <view class="fin_txt">上传照片</view>
						</view>
						<view class="fin_img" v-else>
							<image class="uni-uploader__img" :src="shop_photos" :data-src="shop_photos" @tap="chooseImageShopPhoto"></image>
						</view>
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">账户类型</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">开户名称</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">开户银行</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">开户银行省市编码</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">开户银行全称</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<tui-list-cell :hover="false" padding="0">
					<view class="tui-line-cell">
						<view class="tui-title">银行账号</view>
						<input placeholder-class="tui-phcolor" class="tui-input" v-model="shop_phone" placeholder="请输入联系方式" maxlength="11"
						 type="text" />
					</view>
				</tui-list-cell>
				<view class="ag_title">
					<radio-group @change="change" style="transform:scale(0.7)" color="#e41f19">
					    <radio color="#e41f19"/>
					</radio-group>
					<view>我已阅读并了解</view>
					<view class="agreement" @tap="treaty">【商户申请协议】</view>
				</view>
				
				<!-- 保存地址 -->
				<view class="tui-btn__box">
					<view class="tui-addr-save" v-if="shop_id===''">
						<tui-button shadow type="danger" height="88rpx" shape="circle" v-if="checked" @click="submit" :loading="isloading" :disabled="isdisabled">点击申请</tui-button>
						<tui-button shadow type="black" disabled height="88rpx" shape="circle" v-else>点击申请</tui-button>
					</view>
				</view>
				<view class="tui-btn__box" v-if="shop_id!==''">
					<view class="tui-addr-save">
						<tui-button shadow type="danger" height="88rpx" shape="circle" v-if="checked" @click="submits" :loading="isloading" :disabled="isdisabled">点击修改</tui-button>
						<tui-button shadow type="black" disabled height="88rpx" shape="circle" v-else>点击修改</tui-button>
					</view>
				</view>
			</form>
		</view>
	</view>
</template>
<script>
	import {
		pathToBase64,
		base64ToPath
	} from 'image-tools'
export default {
	data() {
		return {
				shop_name: "",
				credit_code: "",
				shop_phone: "",
				city: "",
				district: "",
				address: "",
				zip_code: "",
				shop_photos:'',
				front_id_card:'',
				back_id_card:'',
				checked:false,
				business_license:'',
			longitude:'',
			latitude:'',
			imgarr:[],
			isdisabled:false,
			isloading:false,
			shop_id: "",
		};
	},
	onShow() {
		this.tui.haslogin();
		this.inits()
	},
	methods: {
		change(e){
			this.value = e.detail.value;
			this.checked=true;
		},
		maps(){
			uni.chooseLocation({
			    success:(res)=>{
					this.address=res.address;
					this.longitude=res.latitude;
					this.latitude=res.longitude;
			    }
			});
		
		},
		inits(){
			let token = this.tui.getToken();
			let joiningTrader={
				token: token,
				type:1,
			};
			
			let joingTrade=this.tui.request('shop','post',joiningTrader,1000,1,'','shopApply');
			Promise.resolve(joingTrade).then((value)=>{
			   if(value.code==200){
				this.shop_id = value.data.shop_id;
				this.shop_name = value.data.shop_name;
				this.credit_code = value.data.credit_code;
				this.shop_phone = value.data.shop_phone;
				this.shop_photos = value.data.shop_photos;
				this.business_license = value.data.business_license;
				this.front_id_card = value.data.front_id_card;
				this.back_id_card = value.data.back_id_card;
				uni.showToast({
					title: value.data.note,
					icon:'none',
					duration: 2000
				});
			   }else{
			   	  
			   }
			})
		},
		treaty:function(){
			uni.navigateTo({
				url: '../franchisee/treaty'
			});
		},
		chooseImageIdcard: async function() {
			uni.chooseImage({
				sizeType: ['original', 'compressed'],
				sourceType: ['album', 'camera'],
				count: 1,
				success: (res) => {
					let max_size=5*1024*1024;
					if (res.tempFiles[0].type.indexOf("image") < 0) {                
					   this.tui.toast("请选择图片类型的文件");
					   return;
					}
					if(res.tempFiles[0].size>=max_size){
						this.tui.toast("上传图片不能超过5M");
						return;
					}
					this.front_id_card = res.tempFilePaths;
					let token = this.tui.getToken();
		
					let datas={
						token: token,
						image:res.tempFiles[0].name,
						img_type:2,
					};
					let uper = this.tui.uploadFile('shop',datas,res.tempFilePaths[0],'applyFile');
                    Promise.resolve(uper).then((value)=>{
						
					   if(value.code==200){
					   	this.imgarr.push(value.data.file_path);
					   }else{
					   	this.tui.toast(value.message);
					   }
					})
					
				},
				fail: (err) => {
					// #ifdef APP-PLUS
					if (err['code'] && err.code !== 0 && this.sourceTypeIndex === 2) {
						this.checkPermission(err.code);
					}
					// #endif
					// #ifdef MP
					// #endif
				}
			})
		},
		chooseImageBackCard: async function() {
			uni.chooseImage({
				sizeType: ['original', 'compressed'],
				sourceType: ['album', 'camera'],
				count: 1,
				success: (res) => {
					let max_size=5*1024*1024;
					if (res.tempFiles[0].type.indexOf("image") < 0) {                
					   this.tui.toast("请选择图片类型的文件");
					   return;
					}
					if(res.tempFiles[0].size>=max_size){
						this.tui.toast("上传图片不能超过5M");
						return;
					}
					this.back_id_card = res.tempFilePaths;
				
					let token = this.tui.getToken();
					
					let datas={
						token: token,
						image:res.tempFiles[0].name,
						img_type:2,
					};
					let uper = this.tui.uploadFile('imgs',datas,res.tempFilePaths[0],'uploadImg');
					Promise.resolve(uper).then((value)=>{
						
					   if(value.code==200){
					   	this.imgarr.push(value.data.file_path);
					   }else{
					   	this.tui.toast(value.message);
					   }
					})
				},
				fail: (err) => {
					// #ifdef APP-PLUS
					if (err['code'] && err.code !== 0 && this.sourceTypeIndex === 2) {
						this.checkPermission(err.code);
					}
					// #endif
					// #ifdef MP
					// #endif
				}
			})
		},
		chooseImageBusiness: async function() {
			uni.chooseImage({
				sizeType: ['original', 'compressed'],
				sourceType: ['album', 'camera'],
				count: 1,
				success: (res) => {
					let max_size=5*1024*1024;
					if (res.tempFiles[0].type.indexOf("image") < 0) {                
					   this.tui.toast("请选择图片类型的文件");
					   return;
					}
					if(res.tempFiles[0].size>=max_size){
						this.tui.toast("上传图片不能超过5M");
						return;
					}
					this.business_license = res.tempFilePaths;
				
					let token = this.tui.getToken();
					
					let datas={
						token: token,
						image:res.tempFiles[0].name,
						img_type:2,
					};
					let uper = this.tui.uploadFile('imgs',datas,res.tempFilePaths[0],'uploadImg');
					Promise.resolve(uper).then((value)=>{
						
					   if(value.code==200){
					   	this.imgarr.push(value.data.file_path);
					   }else{
					   	this.tui.toast(value.message);
					   }
					})
				},
				fail: (err) => {
					// #ifdef APP-PLUS
					if (err['code'] && err.code !== 0 && this.sourceTypeIndex === 2) {
						this.checkPermission(err.code);
					}
					// #endif
					// #ifdef MP
					// #endif
				}
			})
		},
		chooseImageShopPhoto: async function() {
			uni.chooseImage({
				sizeType: ['original', 'compressed'],
				sourceType: ['album', 'camera'],
				count: 1,
				success: (res) => {
					let max_size=5*1024*1024;
					if (res.tempFiles[0].type.indexOf("image") < 0) {                
					   this.tui.toast("请选择图片类型的文件");
					   return;
					}
					if(res.tempFiles[0].size>=max_size){
						this.tui.toast("上传图片不能超过5M");
						return;
					}
					this.shop_photos = res.tempFilePaths;
		
					let token = this.tui.getToken();
					
					let datas={
						token: token,
						image:res.tempFiles[0].name,
						img_type:2,
					};
					let uper = this.tui.uploadFile('imgs',datas,res.tempFilePaths[0],'uploadImg');
					Promise.resolve(uper).then((value)=>{
						
					   if(value.code==200){
					   	this.imgarr.push(value.data.file_path);
					   }else{
					   	this.tui.toast(value.message);
					   }
					})
				},
				fail: (err) => {
					// #ifdef APP-PLUS
					if (err['code'] && err.code !== 0 && this.sourceTypeIndex === 2) {
						this.checkPermission(err.code);
					}
					// #endif
					// #ifdef MP
					// #endif
				}
			})
		},
		submit(){
			this.isloading=true;
			this.isdisabled=true;
			let token = this.tui.getToken();
			let datas={
				token: token,
				shop_name:this.shop_name,
				credit_code:this.credit_code,
				address:this.address,
				longitude:this.longitude,
				latitude:this.latitude,
				front_id_card:this.imgarr[0],
				back_id_card:this.imgarr[1],
				business_license:this.imgarr[2],
				shop_photos:this.imgarr[3],
				contacts_phone:this.shop_phone,
			};
			let franchinese=this.tui.request('user','post',datas,1000,1,'','applyContractMerchants');
			Promise.resolve(franchinese).then((value)=>{
			   if(value.code==200){
			   	this.tui.toast(value.message);
				uni.navigateTo({
					url: '/pageschild/user/examine'
				});
			   }else{
			   	this.tui.toast(value.message);
				this.isloading=false;
				this.isdisabled=false;
			   }
			})
		},
		submits() {
			let token = this.tui.getToken();
			let rectification={
				token: token,
				shop_name:this.shop_name,
				credit_code:this.credit_code,
				address:this.address,
				longitude:this.longitude,
				latitude:this.latitude,
				front_id_card:this.imgarr[0],
				back_id_card:this.imgarr[1],
				business_license:this.imgarr[2],
				shop_photos:this.imgarr[3],
				contacts_phone:this.shop_phone,
			};
			
			let rectificat=this.tui.request('user','post',rectification,1000,1,'','rectificationJoiningTrader');
			Promise.resolve(rectificat).then((value)=>{
			   if(value.code==200){
				   this.initlist()
				   uni.navigateTo({
				   	url: '/pageschild/user/examine'
				   });
			   }else{
			   	
			   }
			})
		},
		initlist(){
			let token = this.tui.getToken();
			let joiningTrader={
				token: token,
				type:1,
			};
			
			let joingTrade=this.tui.request('join','post',joiningTrader,1000,1,'','joinTradeDetail');
			Promise.resolve(joingTrade).then((value)=>{
			   if(value.code==200){
				this.joingTrade=value.data;
				if(this.joingTrade.state==0){
					setTimeout(()=>{
					     this.cg=true
					},3000)
				}
			   }else{
			   	
			   }
			})
		},
	},
};
</script>

<style>
page {
	background-color: #f7f7f7;
}

.container {
	padding-bottom: 100rpx;
	margin-top:20rpx;
	color: #333;
}
.tui-line-cell {
		width: 100%;
		padding: 24rpx 30rpx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
	}

	.tui-title {
		width: 240rpx;
		font-size: 28rpx;
	}

	.tui-title-city-text {
		width: 180rpx;
		height: 40rpx;
		display: block;
		line-height: 46rpx;
	}
	
	.ag_title{margin:40rpx 40rpx 0 30rpx;display: flex;box-sizing: border-box;
		display: flex;
		align-items: center;font-size: 20rpx;}
    .uni-uploader__img{width:100%;height:100%;}
	.tui-input {
		width: 500rpx;
		font-size: 28rpx;
	}
	.agreement{color:#ff241d}
.tui-btn__box{
    width: 100%;
    padding: 20px 15px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
	.tui-input-city {
		flex: 1;
		height: 40rpx;
		font-size: 28rpx;
		padding-right: 30rpx;
	}
     .fin-list{
		 justify-content: space-between;
	 }
	 .fin_img{
	 	border:1px dashed #d9d8d8;
		border-radius: 10rpx;
	 	width:146rpx;
	 	height: 146rpx;
	 	margin:1rpx 0;
	 }
	 .icon_cam{display: flex;
		justify-content: center;
		align-items: center;
		margin-top: 22rpx;}
		.fin_txt{
			font-size: 20rpx;text-align: center;color:#707070
		}
	.tui-phcolor {
		color: #ccc;
		font-size: 28rpx;
	}
	.tui-cell-title{
		font-size: 28rpx;
	}
	.tui-addr-label {
		margin-left: 70rpx;
	}

	.tui-label-item {
		width: 76rpx;
		height: 40rpx;
		border: 1rpx solid rgb(136, 136, 136);
		border-radius: 6rpx;
		font-size: 26rpx;
		text-align: center;
		line-height: 40rpx;
		margin-right: 20rpx;
		display: inline-block;
		transform: scale(0.9);
	}
	.tui-label-active{
		background: #E41F19;
		border-color:#E41F19;
		color: #fff;
	}
	.tui-swipe-cell {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background: #fff;
		padding: 10rpx 24rpx;
		box-sizing: border-box;
		border-radius: 6rpx;
		overflow: hidden;
		font-size: 28rpx;
	}

	.tui-switch-small {
		transform: scale(0.8);
		transform-origin: 100% center;
	}
</style>
